import request from '@/utils/request'

// 获取师训订单信息列表(带分页)
export function getOrderList(data) {
  return request({
    url: '/api/campus/order',
    method: 'GET',
    data
  })
}

// 添加师训订单信息
export function createOrder(data) {
  return request({
    url: '/api/campus/order',
    method: 'POST',
    data
  })
}

// 获取师训订单信息
export function getOrderInfo(id) {
  return request({
    url: `/api/campus/order/${id}`,
    method: 'GET'
  })
}

// 修改师训订单信息
export function updateOrder(data) {
  return request({
    url: `/api/campus/order/${data.id}`,
    method: 'PUT',
    data
  })
}

// 修改状态
export function changeEnabledMark(data) {
  return request({
    url: `/api/campus/order/change/${data.id}/${data.enabledMark}`,
    method: 'PUT'
  })
}

// 删除师训订单信息
export function delOrder(id) {
  return request({
    url: `/api/campus/order/${id}`,
    method: 'DELETE'
  })
}
